package com.pcafs.manage.controller;
import com.pcafs.common.core.controller.BaseController;
import com.pcafs.common.core.domain.AjaxResult;
import com.pcafs.manage.service.ICountDataService;
import com.pcafs.manage.vo.CountDataVo;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author heyanghui
 */

@Api(value = "数据统计", tags = {"数据统计"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/manage/countData")
public class CountData extends BaseController {

    private final ICountDataService countDataService;

    @GetMapping("/stuCount")
    public AjaxResult<Integer> stuCount() {
        return AjaxResult.success(countDataService.stuCount());
    }
    @GetMapping("/userCount")
    public AjaxResult<Integer> userCount() {
        return AjaxResult.success(countDataService.userCount());
    }
    @GetMapping("/teacherCount")
    public AjaxResult<Integer> teacherCount() {
        return AjaxResult.success(countDataService.teacherCount());
    }
    @GetMapping("/actCount")
    public AjaxResult<Integer> actCount() {
        return AjaxResult.success(countDataService.actCount());
    }
    @GetMapping("/communityCount")
    public AjaxResult<Integer> communityCount() {
        return AjaxResult.success(countDataService.communityCount());
    }
    @GetMapping("/collegeCount")
    public AjaxResult<Integer> collegeCount() {
        return AjaxResult.success(countDataService.collegeCount());
    }


    /**
     *  学院社团统计
     * @return
     */
    @GetMapping("/ccCount")
    public AjaxResult<List<CountDataVo>> ccCount() {
        return AjaxResult.success(countDataService.ccCount());
    }

    /**
     * 学院活动统计
     * @return
     */
    @GetMapping("/cActCount")
    public AjaxResult<List<CountDataVo>> cActCount() {
        return AjaxResult.success(countDataService.cActCount());
    }

    /**
     * 学院入团学生统计
     * @return
     */
    @GetMapping("/cUserCount")
    public AjaxResult<List<CountDataVo>> cUserCount() {
        return AjaxResult.success(countDataService.cUserCount());
    }

    /**
     * 学院学生统计
     * @return
     */
    @GetMapping("/cStuCount")
    public AjaxResult<List<CountDataVo>> cStuCount() {
        return AjaxResult.success(countDataService.cStuCount());
    }
    /**
     * 学院学生统计
     * @return
     */
    @GetMapping("/cFirstCount")
    public AjaxResult<List<CountDataVo>> cFirstCount() {
        return AjaxResult.success(countDataService.cFirstCount());
    }
    /**
     * 学院学生统计
     * @return
     */
    @GetMapping("/cSecondCount")
    public AjaxResult<List<CountDataVo>> cSecondCount() {
        return AjaxResult.success(countDataService.cSecondCount());
    }
    /**
     * 学院学生统计
     * @return
     */
    @GetMapping("/cThirdCount")
    public AjaxResult<List<CountDataVo>> cThirdCount() {
        return AjaxResult.success(countDataService.cThirdCount());
    }
}
